import { EntityModel } from '@midwayjs/orm';
import { BaseEntity } from '@cool-midway/core';
import { Column } from 'typeorm';

/**
 * 描述
 */
@EntityModel('weibo_activity')
export class WeiboActivityEntity extends BaseEntity {
  @Column({ comment: '名称' })
  name: string;

  @Column({ comment: '封面', type: 'varchar' })
  image: string;

  @Column({ comment: '开始时间', nullable: true })
  startTime: Date;

  @Column({ comment: '结束时间', nullable: true })
  endTime: Date;

  @Column({
    comment: '状态 (1 有效，0 逻辑删除)',
    type: 'tinyint',
    name: 'status',
    default: 1,
    nullable: true,
  })
  status: number;

  @Column({ comment: '简介', type: 'longtext', nullable: true })
  content: string;

  @Column({ comment: '用户', type: 'int', width: 11, name: 'user_id' })
  userId: number;
}
